
#ifndef __usart_H
#define __usart_H
#ifdef __cplusplus
 extern "C" {
#endif
#include "main.h"
extern UART_HandleTypeDef huart1;
extern UART_HandleTypeDef huart2;
#define RECEIVELEN 255
#define USART_DMA_SENDING 1
typedef struct
{
uint8_t receive_flag:1;
uint16_t rx_len;
uint8_t usartDMA_rxBuf[RECEIVELEN];
}USART_RECEIVETYPE;
extern USART_RECEIVETYPE UsartType1,UsartType2;
void UsartReceive_IDLE(UART_HandleTypeDef *huart);
void Usart2Out_uart1RecvData(void);
void MX_USART1_UART_Init(void);
void MX_USART2_UART_Init(void);
#ifdef __cplusplus
}
#endif
#endif